RESTful Engine Python Client Reference
This article describes how to get the Fluent RESTful V2 .NET Standard client installed, as well as a list of all methods and models defined in the client.
Important
You must use Python 3.8.6 (64bit) for this client to run on your machine. You can get that here.
#
Setting Up the Clientnote
To see a sample application using the Fluent RESTful V2 .NET Standard client, please refer to our sample Java application github page.
To set up the client, run the following command in the command prompt:
pip install windwardrestapi==21.0.0.11
Then in your project, include this line:
from windwardrestapi.Api import WindwardClient as Client
Then to initialize the client:
client = Client.WindwardClient("[RESTful URL]")
Now, the client is setup and you can call the different methods associated with it.
#
Client Modelsinfo
This section will go over the relevant models associated with the client that you will use.
To import the models into your project, use:
from windwardrestapi.Model import *
#
TemplateThese are the parameters for the Template object constructor:
When constructing the template object, explicitly set the input parameters, ie: testTemplate = Template.Template(data=file, outputFormat=Template.outputFormatEnum.DOCX, datasources=testXmlDS, parameters=testParam)
Only set the input parameters that apply to your report. You must have either the data input parameter or the connectionString input parameter set.
#
XML 1.0 Data SourceThese are the input parameters for the XML 1.0 data source constructor:
This is how you instantiate the object:
#
SQL Data SourceThese are the input parameters for the SQL data source constructor:
This is how you instantiate the object:
#
Salesforce OAuth Data SourceThese are the input parameters for the SalesforceOauth data source constructor:
This is how you instantiate the object:
#
Salesforce Data SourceThese are the input parameters for the Salesforce data source constructor:
This is how you instantiate the object:
#
OData Data SourceThese are the input parameters for the OData data source constructor:
This is how you instantiate the object:
#
JSON Data SourceThese are the input parameters for the JSON data source constructor:
This is how you instantiate the object:
#
ParameterThese are the input parameters for the Parameter constructor:
(Parameter value explained next) The template object takes in a list of Parameter objects, so if you have multiple, append them to an array and pass them in that way. This is how you instantiate on parameter:
You could also just construct the ParameterValue object outside of this line and then include it:
#
ParameterValueIf your template has parameters, use this model for the wrappedValue in the Parameter constructor. These are the input parameters for the ParamValue constructor:
This is how you instantiate the object:
#
Client Methods#
Client ConstructorInput Parameters:
This is how you would call it:
#
Client.GetVersion()This method is used to get the version information with regards to the server and the local client. No input parameters. How to call:
Returns version data.
#
Client.postDocument(Template t)This method is used to post the constructed template object to the RESTful engine. Takes in a Template object How to call:
Returns a document object.
#
Client.getDocumentStatus(string GUID)This method is used to get the status of the document being processed. You MUST use this method to check the status of the document before getting the document back. How to call:
This is how we recommend using this in your application:
We need to wait until GetDocumentStatus() returns 302. The method returns Http status codes.
#
Client.getDocument(string GUID)This method is used to get the document after its done processing. You pass to it the Guid:
This method returns the document object.
#
Client.deleteDocument(string guid)This method is used to delete the document after its done processing. You pass to it the Guid: